using UnityEngine;
using System.Collections;

public class BasicCamera : SmoothFollow
{
	public	Transform		m_tMainTarget;
	public	Transform		m_tSecondaryTarget;
	public	float			m_fRelativeWeightToMain = 0.5f;
	
/*
	// Use this for initialization
	void Start ()
	{
		if(!m_tSecondaryTarget)
		{
			m_tSecondaryTarget = GameObject.FindWithTag("Player");
		}
		if(!target)
		{
			m_tMainTarget = GameObject.Find("GameplayArea");
		}
	}
*/
	
	//---------------------------------------------------------------------------------------------------------
	//---------------------------------------------------------------------------------------------------------
	public override void LateUpdate ()
	{
		target.rotation	= m_tMainTarget.rotation;
		target.position = m_tMainTarget.position 		* (m_fRelativeWeightToMain) 
						+ m_tSecondaryTarget.position 	* (1.0f - m_fRelativeWeightToMain);
		
		base.LateUpdate();
		
		// Test
		//transform.Rotate(0.0f,0.0f,90.0f);
	}
}

